<%@ page import="java.util.Objects" %><%--
  Created by IntelliJ IDEA.
  User: humeng
  Date: 2022/10/17
  Time: 15:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>verify</title>
</head>
<body>
<%--验证界面--%>
<%
    //post请求解决中文乱码
    request.setCharacterEncoding("utf-8");

    String username = request.getParameter("username");
    String password = request.getParameter("password");
    if (Objects.equals(username,"admin")&&Objects.equals(password,"1234")){
        //登陆成功 重定向到main页面
        response.sendRedirect("main.jsp");
    }else {
        //登陆失败 重定向到login页面
        response.sendRedirect("login.jsp");
    }

%>


</body>
</html>